package part10;

/**
 * @author wcj
 * @Date 2021/5/19 16:43
 * @Version 1.0
 */
public class Part101 {

    /**
     * 内部类即直接定义在类的里面即可
     */
    class Contents {
        private int i = 11;

        public int value() {
            return i;
        }
    }

    class Destination {
        private String label;

        public Destination(String whereTo) {
            label = whereTo;
        }

        public String readLabel() {
            return label;
        }
    }

    public void ship(String dest) {
        Contents contents = new Contents();
        Destination destination = new Destination(dest);
        destination.readLabel();
    }

    public Contents contents() {
        return new Contents();
    }

    public Destination to(String s) {
        return new Destination(s);
    }
    
    public static void main(String[] args) {
        Part101 part101 = new Part101();
        part101.ship("inner class");
        Contents contents = part101.contents();
        Part101.Destination d = part101.to("init inner");
    }
}
